/* vector容器 赋值 */
#include <iostream>
#include <vector>

using namespace std;

void my_print(vector<int> &v);

int main(int argc, char **argv)
{
    vector<int> v1;
    v1.assign(10, 5);

    my_print(v1);

    vector<int> v2(3, 9);

    v1.swap(v2);

    my_print(v1);


    return 0;
}

void my_print(vector<int> &v)
{
    vector<int>::iterator it = v.begin();

    for (; it != v.end(); it++)
    {
        cout << *it << " ";

    }
    cout << endl;




    return;
}